package com.rg1906.dao.Impl;

import java.sql.SQLException;

import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;

import com.rg1906.utils.DataSourceC3P0ThreadLocal;

public class UpdateStudentMessageDaoImpl {
	DataSource dataSource = DataSourceC3P0ThreadLocal.getDataSource();
	QueryRunner qr = new QueryRunner(dataSource);
	public int updateStudentMessage(String id,String realname, String phone, String address, String sex,
			String age) throws SQLException {
		Object[] par= {realname,phone,address,sex,age,id};		
		String sql="update t_student set realname=?,phone=?,address=?,sex=?,age=? where id=?";
		return qr.update(sql,par);
		
	}
}
